<?php
/**
 * Created by PhpStorm.
 * User: tandunzhao
 * Date: 2018/5/30
 * Time: 下午1:47
 */

namespace App\Modules\Shop\Services;


use App\Modules\Shop\Models\Products;
use App\Modules\Shop\Models\ProductSpecifiction;

class ProductsSpecifictionService
{
    public static function getProductSpecByIds($ids) {
        return ProductSpecifiction::whereIn('id',$ids)->get();
    }

    public static function addProductSpec($data) {
        return ProductSpecifiction::create($data);
    }

    public static function updateProductSpec($id,$data) {
        return ProductSpecifiction::where('id',$id)->update($data);
    }
}